package demo;

import java.util.*;

public class zi    {

    public static void main(String args[]) {
    Collection<String > coll = new ArrayList<>();
    coll.add("hello");
    coll.add("world");
        System.out.println(coll);
        //boolean result = coll.remove("hello");
        //System.out.println(result);
        System.out.println(coll);

    //coll.clear();
        //boolean resultt = coll.isEmpty();
        System.out.println(coll.isEmpty());
        System.out.println(coll.size());
     Object[] arr=  coll.toArray();//返回object类数组
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]);
        }

    }
    }
